package com.cs5103.calendar;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.ViewGroup;
import android.widget.Toast;

public class CalendarPagerAdapter extends FragmentStatePagerAdapter {

	private CalendarFragment[] mFragments;
	
	public CalendarPagerAdapter(FragmentManager fm, CalendarFragment[] mFragments) {
		super(fm);
		// TODO Auto-generated constructor stub
		this.mFragments = mFragments;
	}

	@Override
	public Fragment getItem(int mPosition) {
		// TODO Auto-generated method stub
//		return CalendarFragment.initCalendarFragment();
		return mFragments[mPosition];
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return mFragments.length;
	}
	
	@Override
	public void setPrimaryItem(ViewGroup container, int position, Object object) {
		super.setPrimaryItem(container, position, object);
	}
	
	@Override
	public void finishUpdate(ViewGroup container) {
		super.finishUpdate(container);

		
	}
}
